package com.gisocn.onemap.utils;

import android.content.Context;
import android.text.TextUtils;
import com.gisocn.onemap.base.MyApplication;
import com.hjq.toast.ToastUtils;

/* loaded from: classes2.dex */
public class ToastUtil {
    private static Context mContext = MyApplication.getInstances();

    private static void showCenter(CharSequence charSequence, int i) {
        if (TextUtils.isEmpty(charSequence == null ? "" : charSequence.toString())) {
            charSequence = "";
        }
        if (TextUtils.isEmpty(charSequence)) {
            return;
        }
        ToastUtils.show(charSequence);
    }

    public static void show(CharSequence charSequence) {
        showCenter(charSequence, 0);
    }

    public static void show(int i) {
        showCenter(mContext.getResources().getText(i), 0);
    }

    public static void showLong(CharSequence charSequence) {
        showCenter(charSequence, 1);
    }

    public static void showLong(int i) {
        showCenter(mContext.getResources().getText(i), 1);
    }
}
